package com.hongyan.bean;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

public class Homework {
    private String h_id;
    private String c_id;
    private String h_title;
    private String content;
    private Timestamp start_time;
    private Timestamp end_time;
    private BigDecimal t_grade;
    private String s_submission;

    @Override
    public String toString() {
        return "Homework{" +
                "h_id='" + h_id + '\'' +
                ", c_id='" + c_id + '\'' +
                ", h_titlel='" + h_title + '\'' +
                ", content='" + content + '\'' +
                ", start_time=" + start_time +
                ", end_time=" + end_time +
                ", t_grade=" + t_grade +
                ", s_submission='" + s_submission + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Homework homework = (Homework) o;
        return Objects.equals(h_id, homework.h_id) && Objects.equals(c_id, homework.c_id) && Objects.equals(h_title, homework.h_title) && Objects.equals(content, homework.content) && Objects.equals(start_time, homework.start_time) && Objects.equals(end_time, homework.end_time) && Objects.equals(t_grade, homework.t_grade) && Objects.equals(s_submission, homework.s_submission);
    }

    @Override
    public int hashCode() {
        return Objects.hash(h_id, c_id, h_title, content, start_time, end_time, t_grade, s_submission);
    }

    public Object[] toArray() {
        return new Object[]{
                h_id, c_id, h_title, content, start_time, end_time, t_grade, s_submission
        };
    }

    public String getH_id() {
        return h_id;
    }

    public void setH_id(String h_id) {
        this.h_id = h_id;
    }

    public String getC_id() {
        return c_id;
    }

    public void setC_id(String c_id) {
        this.c_id = c_id;
    }

    public String getH_title() {
        return h_title;
    }

    public void setH_title(String h_title) {
        this.h_title = h_title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Timestamp getStart_time() {
        return start_time;
    }

    public void setStart_time(Timestamp start_time) {
        this.start_time = start_time;
    }

    public Timestamp getEnd_time() {
        return end_time;
    }

    public void setEnd_time(Timestamp end_time) {
        this.end_time = end_time;
    }

    public BigDecimal getT_grade() {
        return t_grade;
    }

    public void setT_grade(BigDecimal t_grade) {
        this.t_grade = t_grade;
    }

    public String getS_submission() {
        return s_submission;
    }

    public void setS_submission(String s_submission) {
        this.s_submission = s_submission;
    }
}
